import DBUtils

db = DBUtils.DBUtils(password="123456", database="study")
creat_sql = '''
CREATE TABLE `person`(
    `username` VARCHAR(20),
    `age` INT,
    `sex` CHAR(4),
    `high` DOUBLE(3,2)
)
'''
insert_sql = "INSERT INTO `person` VALUES (%s, %s, %s, %s)"
db.update(creat_sql)
for i in range(10):
    db.update(insert_sql, (f"name{i + 1}", f"{20 + i}", "女" if i % 2 == 0 else "男", f"{1.68 + (i + 1) * 0.01}",))
